package br.com.mooble.activitys;

import android.app.Activity;
import android.content.Intent;
import android.view.View;
import android.widget.RadioButton;
import br.com.mooble.R;

import com.googlecode.androidannotations.annotations.AfterViews;
import com.googlecode.androidannotations.annotations.Click;
import com.googlecode.androidannotations.annotations.EActivity;
import com.googlecode.androidannotations.annotations.Fullscreen;
import com.googlecode.androidannotations.annotations.NoTitle;
import com.googlecode.androidannotations.annotations.ViewById;
import com.markupartist.android.widget.ActionBar;
import com.markupartist.android.widget.ActionBar.AbstractAction;

@NoTitle
@Fullscreen
@EActivity(R.layout.forum)
public class Forum extends Activity {

	@ViewById
	RadioButton radioHome;
	@ViewById
	RadioButton radioCalendario;
	@ViewById
	RadioButton radioForum;
	@ViewById
	RadioButton radioMais;
	@ViewById
	ActionBar actionBar;

	@AfterViews
	void inicializar() {
		configurarActionBar();
		radioForum.setChecked(true);

	}

	private void configurarActionBar() {

		actionBar.setTitle("Forum");
		actionBar.setHomeLogo(R.drawable.ic_forum_barra);
		actionBar.addAction(new AcaoConfigurar());
	}

	public class AcaoConfigurar extends AbstractAction {

		public AcaoConfigurar() {
			super(R.drawable.gear);

		}

		public void performAction(View view) {

		}
	}

	@Click({R.id.radioHome, R.id.radioCalendario,
		R.id.radioMais })
	public void onCheckedChanged(View buttonView) {
		
			if (buttonView.getId() == R.id.radioHome) {
				Intent iHome = new Intent(Forum.this, Principal_.class);
				Forum.this.startActivity(iHome);
				Forum.this.overridePendingTransition(
						R.anim.slide_entrando_esquerda,
						R.anim.slide_saindo_direita);

			} else if (buttonView.getId() == R.id.radioCalendario) {
				Intent iCalendario = new Intent(Forum.this, Calendario_.class);
				Forum.this.startActivity(iCalendario);
				Forum.this.overridePendingTransition(
						R.anim.slide_entrando_esquerda,
						R.anim.slide_saindo_direita);

			} else if (buttonView.getId() == R.id.radioMais) {
				Intent iMais = new Intent(Forum.this, Mais_.class);
				Forum.this.startActivity(iMais);
				Forum.this.overridePendingTransition(
						R.anim.slide_entrando_direita,
						R.anim.slide_saindo_esquerda);
			}

		}


}